export default class EventBus {
  constructor() {this.bus = {}}
  $on = (evName, callback) => this.bus[evName] ? this.bus[evName].push(callback) : (this.bus[evName] = [callback])
  $emit = (evName, ...args) => this.bus[evName].forEach(callback => callback(...args))
}